package com.example.conversation.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 对话会话表
 * </p>
 *
 * @author crp
 * @since 2025-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("conversations")
public class Conversations implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 会话ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 角色ID
     */
    @TableField("character_id")
    private Long characterId;

    /**
     * 会话ID
     */
    @TableField("session_id")
    private String sessionId;

    /**
     * 对话标题
     */
    @TableField("title")
    private String title;

    /**
     * 开始时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 状态：1-进行中，2-已结束，3-已删除
     */
    @TableField("status")
    private Integer status;

    /**
     * 总消息数
     */
    @TableField("total_messages")
    private Integer totalMessages;

    /**
     * 用户情绪总结
     */
    @TableField("user_emotion_summary")
    private String userEmotionSummary;

    /**
     * 通话时长(秒)
     */
    @TableField("call_duration")
    private Integer callDuration;

    /**
     * 音频质量
     */
    @TableField("audio_quality")
    private String audioQuality;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;


}
